Skip to content

Conversation

@bokelley
Copy link
Contributor

Summary

  • Add comprehensive member engagement tracking with automated signals (profile configured, dashboard logins, working group memberships, email clicks)
  • Add human-set interest level field with attribution (who set it, when, optional notes)
  • Display engagement signals in admin org detail page with ability to set interest levels
  • Track user logins during OAuth callback for engagement metrics

Test plan

  • Run the database migration (039_member_engagement.sql)
  • Verify login tracking works by logging in and checking admin org detail
  • Test setting interest levels via the admin UI modal
  • Verify engagement signals display correctly in the org detail page
  • Check engagement level calculation incorporates new signals

🤖 Generated with Claude Code

bokelley and others added 3 commits December 28, 2025 07:37
…vels

- Add user_logins table for tracking dashboard logins
- Add interest_level fields to organizations (low/medium/high/very_high)
- Record logins during OAuth callback for engagement metrics
- Add OrganizationDatabase methods for engagement signal queries:
  - recordUserLogin, getEngagementSignals, setInterestLevel
- Enhance admin org detail page with Engagement Signals card:
  - Interest level with attribution (who set it, when)
  - Member profile status, login count, WG count, email clicks
- Add API endpoints:
  - PUT /api/admin/organizations/:orgId/interest-level
  - GET /api/admin/organizations/:orgId/engagement-signals
- Update engagement level calculation to incorporate new signals

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove user_logins table in favor of org_activities with
activity_type='dashboard_login'. This reuses the existing activity
tracking infrastructure rather than creating a separate table.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bokelley bokelley merged commit 03924f7 into main Dec 28, 2025
6 checks passed
bokelley added a commit that referenced this pull request Dec 29, 2025
Two migrations had the same version number (039):
- 039_member_engagement.sql (PR #376)
- 039_working_group_leaders.sql (PR #377)

This caused migration failures on fresh databases (including new worktrees).

Production state:
- Has versions 37/38 as email_tracking/preferences (from old numbering)
- Has version 39 as member_engagement
- Never got working_group_leaders (would have failed with duplicate key)

Fix:
- Rename 039_working_group_leaders.sql → 047_working_group_leaders.sql
- Add CI test to prevent duplicate migration versions in the future

The working_group_leaders migration is idempotent (uses IF NOT EXISTS,
IF EXISTS, ON CONFLICT DO NOTHING), so it will safely apply to prod
as version 47.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
bokelley added a commit that referenced this pull request Dec 29, 2025
* Fix duplicate migration version 039 and add CI check

Two migrations had the same version number (039):
- 039_member_engagement.sql (PR #376)
- 039_working_group_leaders.sql (PR #377)

This caused migration failures on fresh databases (including new worktrees).

Production state:
- Has versions 37/38 as email_tracking/preferences (from old numbering)
- Has version 39 as member_engagement
- Never got working_group_leaders (would have failed with duplicate key)

Fix:
- Rename 039_working_group_leaders.sql → 047_working_group_leaders.sql
- Add CI test to prevent duplicate migration versions in the future

The working_group_leaders migration is idempotent (uses IF NOT EXISTS,
IF EXISTS, ON CONFLICT DO NOTHING), so it will safely apply to prod
as version 47.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add empty changeset for migration fix

Internal fix that doesn't affect the protocol specification.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants